<link type="text/css" rel="stylesheet" href="/public/js_calendar/dhtmlgoodies_calendar.css" media="screen"></LINK>
<script type="text/javascript" src="/public/js_calendar/dhtmlgoodies_calendar.js"></script>
<h2><?php echo $this->escape($this->content_title);?></h2>

<?php /*
<!-- Load jQuery -->
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
    google.load("jquery", "1");
</script>

<!-- Load TinyMCE -->
<script type="text/javascript" src="/public/scripts/tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript">
    $().ready(function() {
        $('textarea.tinymce').tinymce({
            // Location of TinyMCE script
            script_url : '/public/scripts/tiny_mce/tiny_mce.js',

            // General options
            theme : "advanced",
            plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

            // Theme options
            theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
            theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
            theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
            theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
            theme_advanced_toolbar_location : "top",
            theme_advanced_toolbar_align : "left",
            theme_advanced_statusbar_location : "bottom",
            theme_advanced_resizing : true,

            // Example content CSS (should be your site CSS)
            content_css : "/public/scripts/tiny_mce/css/content.css",

            // Drop lists for link/image/media/template dialogs
            template_external_list_url : "lists/template_list.js",
            external_link_list_url : "lists/link_list.js",
            external_image_list_url : "lists/image_list.js",
            media_external_list_url : "lists/media_list.js",

            // Replace values for the template plugin
            template_replace_values : {
                username : "Some User",
                staffid : "991234"
            }
        });
    });
</script>
<!-- /TinyMCE -->
*/ ?>

<div class="form">
<form class="niceform"  action="/article/<?php echo $this->action; ?>/id/<?php echo $this->item->id; ?>" method="post">
 <input type="hidden" name="id" value="<?php echo $this->item->id; ?>" />
        <fieldset>
            <?php if(!empty($this->message)) :?>
            <dl id="message">
                <dt></dt>
                <dd><b style="color:red;"><?php echo $this->message;?></b></dd>
            </dl>
            <?php endif; ?>
            <dl>
                <dt><label for="alias">Alias</label></dt>
                <dd><input type="text" size="54" id="alias" name="alias" value="<?php echo $this->escape(trim($this->item->alias));?>"></dd>
            </dl>        
            <dl>
                <dt><label for="subject">Subject</label></dt>
                <dd><input type="text" size="54" id="subject" name="subject" value="<?php echo $this->escape(trim($this->item->subject));?>"></dd>
            </dl>        
            
            
            <dl>
                <dt><label for="category_id">Category<?php echo $this->category_id;?></label></dt>
                <dd>
                    <select id="category_id" name="category_id" size="1">
                        <?php foreach($this->categories as $key=>$value) { ?> 
                        <option value="<?php echo $key;?>" <?php echo $this->escape(trim($this->item->category_id))==$key?' selected ':'';?>><?php echo $value;?></option>
                        <?php } ?>
                    </select>
                </dd>
            </dl>
            
            <dl>
                <dt><label for="published">Published</label></dt>
                <dd>
                    <select id="published" name="published" size="1">
                        <?php foreach($this->publisheds as $key=>$value) { ?> 
                        <option value="<?php echo $key;?>" <?php echo $this->escape(trim($this->item->published))==$key?' selected ':'';?>><?php echo $value;?></option>
                        <?php } ?>
                    </select>
                </dd>
            </dl>        
            
            <dl>
                <dt><label for="picture">Picture</label></dt>
                <dd><input type="text" size="54" id="picture" name="picture" value="<?php echo $this->escape(trim($this->item->picture));?>"></dd>
            </dl>        
            <dl>
                <dt><label for="path">Path</label></dt>
                <dd><input type="text" size="54" id="path" name="path" value="<?php echo $this->escape(trim($this->item->path));?>"></dd>
            </dl> 
                   
            <dl>
                <dt><label for="real_date">Real date</label></dt>
                <dd><input type="text" size="10" id="real_date" name="real_date" value="<?php echo $this->escape(trim($this->item->real_date));?>">
                <img id="real_date_trigger" src="/public/images/cal.gif" style="padding:6px;" onclick="displayCalendar(document.getElementById('real_date'),'yyyy-mm-dd',this);"></dd>
            </dl>
            <dl>
                <dt><label for="text_date">Text date</label></dt>
                <dd><input type="text" size="54" id="text_date" name="text_date" value="<?php echo $this->escape(trim($this->item->text_date));?>"></dd>
            </dl>        
            <dl>
                <dt><label for="for_print">For print</label></dt>
                <dd>
                    <select id="for_print" name="for_print" size="1">
                        <?php foreach($this->for_prints as $key=>$value) { ?> 
                        <option value="<?php echo $key;?>" <?php echo $this->escape(trim($this->for_print))==$key?' selected ':'';?>><?php echo $value;?></option>
                        <?php } ?>
                    </select>
                </dd>
            </dl>
            
            <dl>
                <dt><label for="short_content">Short content</label></dt>
                <dd><textarea id="short_content" name="short_content" rows="5" cols="45"><?php echo $this->escape(trim($this->item->short_content));?></textarea></dd>
            </dl>
            <dl>
                <dt><label for="content">Content</label></dt>
                <dd><textarea id="content" name="content" rows="20" cols="45"><?php echo $this->escape(trim($this->item->content));?></textarea></dd>
            </dl>
            
            <dl>
                <dt><label for="created_at">Created</label></dt>
                <dd><?php echo $this->item->created_at;?></dd>
            </dl>
            <dl>
                <dt><label for="updated_at">Updated</label></dt>
                <dd><?php echo $this->item->updated_at; ?></dd>
            </dl>
            
             <dl class="submit">
                <a href="javascript:document.forms[0].submit();" class="bt_blue"><span class="bt_blue_lft"></span><strong>Save</strong><span class="bt_blue_r"></span></a>
                <a href="/article" class="bt_blue"><span class="bt_blue_lft"></span><strong>Cancel</strong><span class="bt_blue_r"></span></a>
                <!--<input type="submit" name="submit" id="submit" value="Save" />-->
             </dl>
            
        </fieldset>
        
 </form>
 </div>  